// -----------------------------------------------------------------------
//  <copyright file="ResourceInDtoBase.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2025 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2025/1/6 23:07</last-date>
// -----------------------------------------------------------------------

namespace DaprPlus.Authorization.Application.Commands
{
    public class ResourceInDto
    {
        public long Id { get; set; }

        public required string Name { get; set; }

        public required string Code { get; set; }

        public string? Description { get; set; }

        public required string ServiceName { get; set; }

        public ResourceType Type { get; set; }

        public ResourceAccessType AccessType { get; set; }
        
        public bool IsLocked { get; set; }

        public Dictionary<string, object>? Metadata { get; set; }

        /// <summary>
        /// 获取或设置 允许的操作列表
        /// </summary>
        public ResourceOperation[]? AllowedOperations { get; set; }
    }
}
